﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace down2.api
{
    public class Base64Encoder
    {
        public static Base64Encoder build() {
            return new Base64Encoder();
        }

        public string encode(string n)
        {
            return Convert.ToBase64String(Encoding.UTF8.GetBytes(n));
        }

        public string decode(string n)
        {
            var o = Convert.FromBase64String(n);
            string os = Encoding.UTF8.GetString(o);
            return os;
        }
    }
}